import http from '@/utils/fetch'

/**
 * 订单管理
 */
// 订单列表
export function orderList(params) {
  return http.post('/Supplier/Order/orderList', params)
}

/**
 * 
 * @param {*orderId} params 
 * @returns 
 */
export function updateLease(params) {
  return http.post("/Supplier/Order/updateLease", params);
}

export function sendSigning(params) {
  return http.post('/Supplier/Yfb/sendSigning', params)
}

export function confirmSigning(params) {
  return http.post('/Supplier/Yfb/confirmSigning', params)
}

export function paySigning(params) {
  return http.post('/Supplier/Yfb/paySigning', params)
}

export function finishPay(leaseId) {
  return http.get('/Supplier/QrPay/finishPay', { leaseId })
}

// 查看租期
export function getLease(orderId) {
  return http.post('/Supplier/Order/getLease', { orderId })
}
// 设置修改收货地址
export function setAddress(params) {
  return http.post('/Supplier/Order/setAddress', params, true)
}

// 退款
export function rentRefund(params) {
  return http.post('/Supplier/Order/rentRefund', params)
}
// 修改租赁方式
export function replacePackage(params) {
  return http.post('/Supplier/Order/replacePackage', params)
}
// 添加设备编号
export function setDeviceNumber(params) {
  return http.post('/Supplier/Order/setDeviceNumber', params, true)
}
// 添加拿货价
export function setDeviceTruePrice(params) {
  return http.post('/Supplier/Order/setDeviceTruePrice', params, true)
}
// 添加客服备注
export function setOrderRemark(params) {
  return http.post('/Supplier/Order/setOrderRemark', params, true)
}
// 获取客服备注记录
export function getOrderRemark(params) {
  return http.post('/Supplier/Order/getOrderRemark', params)
}
// 查看流水记录
export function getLeaseFlow(orderNo) {
  return http.post('/Supplier/Order/getLeaseFlow', { orderNo })
}
// 获取物流公司列表
export function getLogisticAll() {
  return http.post('/Supplier/Order/getLogisticAll')
}
// 发货
export function deliverGoods(params) {
  return http.post('/Supplier/Order/deliverGoods', params, true)
}
// 确认收货
export function confirmGoods(params) {
  return http.post('/Supplier/Order/confirmGoods', params, true)
}
// 获取账单详情
export function getLeaseInfo(orderId) {
  return http.post('/Supplier/Order/getLeaseInfo', { orderId })
}
// 获取物流信息
export function getLogisticInfo(params) {
  return http.post('/Supplier/Order/getLogisticInfo', params)
}
// 补充发货确认收货凭证
export function setOrderVoucher(params) {
  return http.post('/Supplier/Order/setOrderVoucher', params, true)
}
// 获取订单状态列表
export function getOrderStatus() {
  return http.post('/Supplier/Order/getOrderStatus')
}
// 订单列表导出
export function orderListExport(params) {
  return http.export('/Supplier/Order/orderListExport', params, '订单列表')
}

// 花呗订单列表
export function orderHuaBeiList(params) {
  return http.post('/Supplier/Order/orderHuaBeiList', params)
}
// 花呗订单列表-导出
export function orderHuaBeiExport(params) {
  return http.export(
    '/Supplier/Order/orderHuaBeiExport',
    params,
    '花呗订单列表'
  )
}
// 买断订单列表
export function orderBuyOutList(params) {
  return http.post('/Supplier/Order/orderBuyOutList', params)
}
// 买断订单列表-导出
export function orderBuyOutListExport(params) {
  return http.export(
    '/Supplier/Order/orderBuyOutListExport',
    params,
    '买断订单列表'
  )
}
// 签约待付款订单列表
export function orderSignedList(params) {
  return http.post('/Supplier/Order/orderSignedList', params)
}
// 签约待支付订单列表-导出
export function orderSignedListExport(params) {
  return http.export(
    '/Supplier/Order/orderSignedListExport',
    params,
    '签约待支付订单列表'
  )
}
// 交易完成
export function orderFinish(orderId) {
  return http.post('/Supplier/Order/orderFinish', { orderId }, true)
}
// 订单同意归还
export function orderReturnAgree(orderId) {
  return http.post('/Supplier/Order/orderReturnAgree', { orderId }, true)
}
// 订单归还审核拒绝
export function orderReturnRefuse(params) {
  return http.post('/Supplier/Order/orderReturnRefuse', params, true)
}
// 订单确认归还
export function orderComfirmReturn(orderId) {
  return http.post('/Supplier/Order/orderComfirmReturn', { orderId }, true)
}
// 订单归还完成
export function orderReturnFinish(orderId) {
  return http.post('/Supplier/Order/orderReturnFinish', { orderId }, true)
}
// 订单关闭
export function orderClose(orderId) {
  return http.post('/Supplier/Order/orderClose', { orderId }, true)
}

// 续租订单列表
export function orderRenewalList(params) {
  return http.post('/Supplier/Order/orderRenewalList', params)
}
// 修改订单物流信息
export function editOrderExpress(params) {
  return http.post('/Supplier/Order/editOrderExpress', params, true)
}
// 下载签收回单
export function getSignReceipt(params) {
  return http.get('/Supplier/Order/getSignReceipt', params)
}
// 获取统计数据
export function getOrderStatisticInfo(params) {
  return http.get('/Supplier/Order/getOrderStatisticInfo', params)
}

// 修改租金
export function changeRent(params) {
  return http.post('/Supplier/Order/changeRent', params)
}

// 手动风控
export function handChargeService(params) {
  return http.post('/Supplier/Order/handChargeService', params)
}

// e签宝sdk签署
export function handSignEsign(params) {
  return http.post('/Supplier/Order/handSignEsign', params)
}

// 手动存证
export function handTWCFile(params) {
  return http.post('/Supplier/Order/handTWCFile', params)
}

// 补充协议
export function createContractSupplement(params) {
  return http.post('/Supplier/Order/createContractSupplement', params)
}

// 获取补充协议
export function getSupplementList(params) {
  return http.get('/Supplier/Order/getSupplementList', params)
}

// 获取存证列表
export function getTWCFile(params) {
  return http.get('/Supplier/Order/getTWCFile', params)
}

// 修改紧急联系人
export function saveEmergencyContact(params) {
  return http.post('/Supplier/Order/saveEmergencyContact', params)
}
// 修改客户信息备注
export function customerInformations(params) {
  return http.post('/Supplier/Order/customerInformations', params)
}
// 获取客户信息备注
export function customerInformation(params) {
  return http.post('/Supplier/Order/customerInformation', params)
}
// 修改分期
export function replaceFenQi(params) {
  return http.post('/Supplier/Order/replaceFenQi', params)
}
// 修改套餐
export function changeSetmeal(params) {
  return http.post('/Supplier/Order/changeSetmeal', params)
}

// 修改用户电话
export function changeMemberMobile(params) {
  return http.post('/Supplier/Order/changeMemberMobile', params)
}

// 修改用户身份证
export function changeMemberNoCard(params) {
  return http.post('/Supplier/Order/changeMemberNoCard', params)
}
// 修改黑名单
export function rollMobile(params) {
  return http.post('/Supplier/Order/rollMobile', params)
}
// 在客户信息里查询风控信息
export function selectFkMessage(params) {
  return http.post('/Supplier/Order/selectFkMessage', params)
}
// 在客户信息里查询风控信息
export function shopName(params) {
  return http.post('/Supplier/Order/shopName', params)
}

// 律师函
export function lawyerLetter(params) {
  return http.post('/Supplier/Order/lawyerLetter', params)
}
export function alterPdf(params) {
  return http.post('/Supplier/Order/alterPdf', params)
}

export function goodsSure(params) {
  return http.post('/Supplier/Order/goodsSure', params)
}
